<%-- 
    Document   : header
    Created on : 10 janv. 2012, 10:45:56
    Author     : Thierry
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
String base = request.getContextPath();
if(session.getAttribute("login") == null && request.getUserPrincipal() != null)
    session.setAttribute("login", request.getUserPrincipal().getName());
pageContext.setAttribute("login", session.getAttribute("login"));
%>

<!DOCTYPE html>
<html>
    <head>
        <title>[HeillecourtTT Manager]</title>
        <link href="<%=base%>/css/main.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <!-- header -->
        <div id="header-wrap">
            <div id="header-container">
                <c:choose>
                    <c:when test='${login != null}'>
                        <div id="header">Bienvenue ${login} (<a href="<%=base%>/logout" onclick="javascript: return confirm('Etes-vous sur de vouloir quitter?');">Deconnexion</a>)!
                            <div id="header-menu">
                                <a href="javascript: history.back();">Revenir</a>&nbsp;<img src="<%=base%>/img/16x16/separator.png" align="absmiddle" alt="sep" width="11" height="17" />&nbsp;&nbsp;
                                <a href="<%=base%>/" title="Tableau de bord">Tableau de bord</a>&nbsp;<img src="<%=base%>/img/16x16/separator.png" align="absmiddle" alt="sep" width="11" height="17" />&nbsp;&nbsp;
                                <a href="<%=base%>/Adherent/edit" title="Editer vos informations">Vos informations&nbsp;</a><img src="<%=base%>/img/16x16/separator.png" align="absmiddle" alt="sep" width="11" height="17" />&nbsp;&nbsp;
                                <a href="<%=base%>/Utilisateur/edit" title="Editer votre mot de passe">Votre mot de passe</a>&nbsp;
                            </div>
                        </div>
                    </c:when>
                    <c:otherwise>
                        <div id="header"><a href="<%=base%>/" title="S'identifier">S'identifier</a></div>
                    </c:otherwise>
                </c:choose>
            </div>
        </div>
        <!-- container -->
        <div id="container">
            <!-- contenu -->
            <div id="content">